package org.eclipse.jdt.internal.ui.callhierarchy;

import java.util.ArrayList;
import java.util.List;

public class TypeNamePairs {

	private List<TypeNamePair> typeNamePairs = new ArrayList<TypeNamePair>();
	
	public TypeNamePairs() {
	}
	
	public void add(TypeNamePair pair) {
		this.typeNamePairs.add(pair);
	}
	
	public String toString() {
		StringBuilder result = new StringBuilder();
		
		if (typeNamePairs.size() > 0) {
			result.append(typeNamePairs.get(0));
			
			for (int i = 1; i < typeNamePairs.size(); i++) {
				result.append(", " + typeNamePairs.get(i));
			}
		}
		
		return result.toString();
	}
}
